home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Your Apple Games Gallery 2
/
Your Apple Games Gallery II (Side B)(MindCraft Publishing Corporation)(1989).do
/
COMPASS.QUIZ.bas
< prev
next >
Wrap
BASIC Source File
|
2021-12-11
|
6KB
|
154 lines
10 REM ************************
20 REM * COMPASS.QUIZ *
30 REM * BY A.M. DEKEUKELAERE *
40 REM * COPYRIGHT (C) 1984 *
50 REM * MINDCRAFT PUBL. CORP.*
60 REM * CONCORD, MA 01742 *
70 REM ************************
80 HOME : HTAB 4: VTAB 13: PRINT "COPYRIGHT 1984 MINDCRAFT PUBL. CORP."
90 HTAB 15: VTAB 5: PRINT "COMPASS QUIZ"
100 PRINT : PRINT : HTAB 20: PRINT "BY"
110 PRINT : PRINT : HTAB 13: PRINT "TONY DEKEUKELAERE "
120 VTAB 17: HTAB 6: PRINT "PUSH DOWN THE CAPS LOCK KEY."
130 REM INSTRUCTIONS?
140 PRINT : PRINT : HTAB 5: INPUT "DO YOU WANT INSTRUCTIONS (Y/N) ?";RE$
150 RE$ = LEFT$(RE$,1)
160 IF RE$ = "N" THEN GOTO 300
170 REM INSTRUCTIONS
180 HOME : HTAB 5: VTAB 5
190 PRINT "YOU WILL BE ASKED TO GIVE THE "
200 PRINT "DIRECTION FROM ONE SQUARE TO ANOTHER"
210 PRINT "SQUARE."
220 PRINT : HTAB 5: PRINT "YOUR ANSWER MUST BE ONE OF"
230 PRINT "THE FOLLOWING :"
240 HTAB 5: INVERSE : PRINT "N S E W NE SE NW SW": NORMAL
250 PRINT : HTAB 5: PRINT "IF YOUR ANSWER IS INCORRECT YOU"
260 PRINT "WILL GET A SECOND CHANCE WITH HELP."
270 PRINT : PRINT : PRINT : PRINT : PRINT "PRESS <RETURN> TO END AND GET YOUR SCORE"
280 PRINT : PRINT : NORMAL : HTAB 6: PRINT "PRESS THE SPACE BAR TO BEGIN": HTAB 20
290 GET X$: IF X$ < > CHR$(32) THEN GOTO 290
300 R1 = 0:R2 = 0:W = 0:TL = 0:RI = 0: REM SET COUNTERS TO ZERO
310 REM DRAW BLOCKS
320 HGR : HCOLOR= 3
330 FOR X = 50 TO 60: FOR Y = 40 TO 50
340 HPLOT X,Y
350 NEXT Y: NEXT X
360 HCOLOR= 2
370 FOR X = 50 TO 60: FOR Y = 140 TO 150
380 HPLOT X,Y
390 NEXT Y: NEXT X
400 HCOLOR= 5
410 FOR X = 220 TO 230: FOR Y = 40 TO 50
420 HPLOT X,Y
430 NEXT Y: NEXT X
440 HCOLOR= 6
450 FOR X = 220 TO 230: FOR Y = 140 TO 150
460 HPLOT X,Y
470 NEXT Y: NEXT X
480 GOSUB 1240: REM --DRAW NUMERALS
490 REM **** MAIN PROGRAM ****
500 GOSUB 770: REM GET QUESTION
510 GOSUB 830: REM PRINT QUESTION
520 GOSUB 1000: REM OBTAIN CORRECT ANSWER
530 IF AN$ < >CR$ THEN GOTO 580
540 R1 = R1 +1
550 HOME : VTAB 23: HTAB 14: FLASH : PRINT "*** RIGHT ***"
560 FOR X = 1 TO 1500: NEXT : NORMAL
570 GOTO 500
580 REM ---SECOND ATTEMPT
590 HOME : VTAB 23: HTAB 13
600 PRINT "SORRY! TRY AGAIN": FOR X = 1 TO 500: NEXT
610 GOSUB 1070: REM DRAW COMPASS
620 GOSUB 830: REM REPEAT QUESTION
630 IF AN$ = "" THEN GOTO 1330
640 GOSUB 1000: REM OBTAIN CORRECT ANSWER
650 IF AN$ < >CR$ THEN GOTO 700
660 R2 = R2 +1
670 HOME : VTAB 23: HTAB 19: PRINT "RIGHT!"
680 FOR X = 1 TO 500: NEXT X
690 GOTO 310
700 REM 2 INCORRECT RESPONSES
710 W = W +1
720 HOME : VTAB 23: HTAB 6
730 INVERSE : PRINT "SORRY ! THE CORRECT ANSWER IS ";CR$: NORMAL
740 HTAB 4: PRINT "PRESS THE SPACE BAR TO CONTINUE": HTAB 20
750 GET X$: IF X$ < > CHR$(32) THEN GOTO 750
760 GOTO 310
770 REM GENERATE A QUESTION
780 A$(1) = "WHITE(1)":A$(2) = "PINK(2)":A$(3) = "BLUE(3)":A$(4) = "ORANGE(4)"
790 N = INT( RND(1) *4 +1)
800 P = INT( RND(2) *4 +1)
810 IF N = P THEN GOTO 800
820 RETURN
830 REM PRINT QUESTION
840 HOME
850 VTAB 21: HTAB 8: PRINT "WHAT IS THE DIRECTION FROM"
860 HTAB 10: PRINT A$(N)" TO "A$(P)
870 HTAB 18: INPUT AN$
880 IF AN$ = "" THEN GOTO 1330
890 AN$ = LEFT$(AN$,2)
900 IF RIGHT$(AN$,1) = " " THEN AN$ = LEFT$(AN$,1)
910 IF AN$ < >"N" AND AN$ < >"S" AND AN$ < >"E" AND AN$ < >"W" AND AN$ < >"NE" AND AN$ < >"SE" AND AN$ < >"NW" AND AN$ < >"SW" THEN GOTO 930
920 RETURN
930 REM --- ILLEGAL RESPONSE---
940 HOME
950 VTAB 21: PRINT "THE ANSWER MUST BE ONE OF THE FOLLOWING"
960 HTAB 10: INVERSE : PRINT "N S E W NE SE NW SW": NORMAL
970 HTAB 4: PRINT "PRESS THE SPACE BAR TO CONTINUE": HTAB 20
980 GET X$: IF X$ < > CHR$(32) THEN GOTO 980
990 GOTO 830
1000 REM ---DETERMINE CORRECT RESPONSE
1010 AP$(1,2) = "S":AP$(1,3) = "SE":AP$(1,4) = "E"
1020 AP$(2,1) = "N":AP$(2,3) = "E":AP$(2,4) = "NE"
1030 AP$(3,1) = "NW":AP$(3,2) = "W":AP$(3,4) = "N"
1040 AP$(4,1) = "W":AP$(4,2) = "SW":AP$(4,3) = "S"
1050 CR$ = AP$(N,P)
1060 RETURN
1070 HCOLOR= 6
1080 HPLOT 140,65 TO 140,125
1090 HPLOT 110,95 TO 170,95
1100 HPLOT 115,70 TO 165,120
1110 HPLOT 165,70 TO 115,120
1120 HPLOT 136,55 TO 136,45 TO 144,55 TO 144,45
1130 HPLOT 144,135 TO 136,135 TO 136,140 TO 144,140 TO 144,145 TO 136,145
1140 HPLOT 188,90 TO 180,90 TO 180,100 TO 188,100: HPLOT 180,95 TO 184,95
1150 HPLOT 90,90 TO 90,100 TO 95,95 TO 100,100 TO 100,90
1160 HPLOT 170,70 TO 170,60 TO 178,70 TO 178,60
1170 HPLOT 190,60 TO 182,60 TO 182,70 TO 190,70: HPLOT 182,65 TO 186,65
1180 HPLOT 178,120 TO 170,120 TO 170,125 TO 178,125 TO 178,130 TO 170,130
1190 HPLOT 190,120 TO 182,120 TO 182,130 TO 190,130: HPLOT 182,125 TO 186,125
1200 HPLOT 88,70 TO 88,60 TO 96,70 TO 96,60
1210 HPLOT 100,60 TO 100,70 TO 105,65 TO 110,70 TO 110,60
1220 HPLOT 96,120 TO 88,120 TO 88,125 TO 96,125 TO 96,130 TO 88,130
1230 HPLOT 100,120 TO 100,130 TO 105,125 TO 110,130 TO 110,120
1240 HCOLOR= 7
1250 HPLOT 30,40 TO 30,50
1260 HCOLOR= 2
1270 HPLOT 30,142 TO 30,140 TO 40,140 TO 40,146 TO 30,146 TO 30,150 TO 40,150
1280 HCOLOR= 6
1290 HPLOT 240,140 TO 250,140 TO 250,150 TO 240,150: HPLOT 244,145 TO 250,145
1300 HCOLOR= 5
1310 HPLOT 250,48 TO 240,48 TO 248,40 TO 246,50
1320 RETURN
1330 REM SCORE SUMMARY
1340 TL = R1 +R2 +W:RI = R1 +R2
1350 TEXT : HOME : VTAB 3: HTAB 15
1360 PRINT "YOUR SCORE"
1370 HTAB 15: PRINT "==========": REM 10 ='S
1380 PRINT : PRINT : PRINT
1390 IF TL = 0 THEN HTAB (8): PRINT "NO QUESTIONS WERE ATTEMPTED.": GOTO 1490
1400 PRINT "ON THE FIRST TRY"
1410 PRINT "----------------": REM 16 -'S
1420 PRINT
1430 HTAB 5: PRINT R1" OUT OF "TL" FOR " INT(R1 *100/TL)" %"
1440 PRINT : PRINT
1450 PRINT "ON THE FIRST AND SECOND TRY"
1460 PRINT "---------------------------": REM 27 -'S
1470 PRINT
1480 HTAB 5: PRINT RI" OUT OF "TL" FOR " INT(RI *100/TL)" %"
1490 PRINT : PRINT : PRINT
1500 HTAB 5: PRINT "PRESS THE SPACE BAR TO CONTINUE."
1510 PRINT : HTAB 8: PRINT "PRESS ANY KEY TO STOP."
1520 PRINT : HTAB 15: GET C$
1530 IF C$ = CHR$(32) THEN HOME : GOTO 300
1540 HOME : END